// pages/home/home.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    imgUrls: [

    ],
    navList: [{
      id: '1',
      name: '美宿',
      image: '/images/home/1.png',
      subText: '文案文案文案'
    }, {
      id: '2',
      name: '美物',
      image: '/images/home/1.png',
      subText: '文案文案文案'
    }, {
      id: '3',
      name: '美食',
      image: '/images/home/1.png',
      subText: '文案文案文案'
    }, {
      id: '4',
      name: '美愿',
      image: '/images/home/1.png',
      subText: '文案文案文案'
    }, {
      id: '5',
      name: '美力',
      image: '/images/home/1.png',
      subText: '文案文案文案'
    }, {
      id: '6',
      name: '招募',
      image: '/images/home/1.png',
      subText: '文案文案文案'
    }],
    indicatorDots: true, // 指示点
    autoplay: true, // 自动滚动
    interval: 5000,
    duration: 1000
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    setTimeout(() => {
      this.setData({
        imgUrls: ['https://bd.fengyitong.name/image/1.jpg',
          'https://bd.fengyitong.name/image/2.jpg',
          'https://bd.fengyitong.name/image/3.jpg'
        ]
      })
    }, 500);
  },
  // 中间按钮点击
  navItemClick(e) {
    // console.log(e)
    let id = e.currentTarget.dataset.id
    wx.navigateTo({
      url: '../map/map?id=' + id
    })
  }


})